return {
    "nvim-neotest/neotest",
    dependencies = {
      "nvim-neotest/nvim-nio",
      "nvim-lua/plenary.nvim",
      "antoinemadec/FixCursorHold.nvim",
      "nvim-treesitter/nvim-treesitter",
      "sidlatau/neotest-dart"
    },
    config = function()
      -- 动态检测FVM的函数
      local function detect_flutter_command()
        -- 检查当前工作目录是否存在 .fvmrc 文件
        local fvmrc_path = vim.fn.getcwd() .. "/.fvmrc"
        local fvmrc_exists = vim.fn.filereadable(fvmrc_path) == 1
        
        -- 检查是否存在 .fvm 目录
        local fvm_dir = vim.fn.getcwd() .. "/.fvm"
        local fvm_dir_exists = vim.fn.isdirectory(fvm_dir) == 1
        
        -- 如果存在 .fvmrc 或 .fvm 目录，则使用 fvm flutter
        if fvmrc_exists or fvm_dir_exists then
          return "fvm flutter"
        else
          return "flutter"
        end
      end
  
      require('neotest').setup({
        adapters = {
          require('neotest-dart') {
            command = detect_flutter_command(),
            use_lsp = true
          }
        },
        -- 配置输出面板
        output_panel = {
          open_on_run = true,  -- 运行测试时自动打开输出面板
          open_on_run_file = true,  -- 运行文件测试时也自动打开
        },
        -- 配置 summary
        summary = {
          mappings = {
            expand = { "<CR>", "<2-LeftMouse>" },
            open = { "<CR>", "<2-LeftMouse>" },
            refresh = "r",
            jump = "g",
          },
        },
      })
    end
  }
  